/* 子组件里也应用了这里的样式，不要随意删除 */
:deep(.leadTips) {
  /* 从世界坐标左上角开始延伸 */
  display: flex;
  width: 1px;
  height: 1px;
  background-color: #ff0000;
  position: relative;
  .tip-box {
    position: absolute;
    left: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: fit-content;
    height: fit-content;
    transform: translateX(-50%) translateY(50%);
    .name {
      color: #fff;
      text-align: center;
      position: absolute;
      z-index: 1;
      bottom: 100%;
      white-space: nowrap;
      width: fit-content;
      height: 20px;
      line-height: 20px;
      font-size: 12px;
      padding: 0 12px;
    }
    img {
      cursor: pointer;
    }
    &.unit-icon,
    &.camera-icon {
      transform: translateX(-50%) translateY(7px);
      .name {
        background: linear-gradient( 90deg, rgba(0,91,91,0) 0%, rgba(0,91,91,0.8) 35%, rgba(0,91,91,0.8) 65%, rgba(0,91,91,0) 100%);
        border: 1px solid;
        border-image: linear-gradient(90deg, rgba(0, 254, 214, 0), rgba(0, 254, 214, 1), rgba(0, 254, 214, 0)) 1 1;
      }
    }
    &.current-value {
      color: #DFFFDE;
      transform: translateX(-50%) translateY(11px);
      &:hover {
        .device-name {
          opacity: 1;
        }
      }
      .device-name {
        background: rgba(1,20,42,0.5);
        white-space: nowrap;
        padding: 3px 10px;
        width: fit-content;
        font-weight: 400;
        font-size: 14px;
        margin-bottom: 10px;
        text-align: center;
        cursor: pointer;
        opacity: 0;
      }
      .value-data {
        padding: 0 10px;
        font-weight: 500;
        font-size: 16px;
        margin-bottom: 6px;
        min-width: 70px;
        text-align: center;
        cursor: pointer;
        span {
          font-weight: 400;
          font-size: 12px;
        }
      }
      .state {
        width: 22px;
        height: 22px;
        border-radius: 50%;
        position: relative;
        box-shadow: 0 0 1px 3px rgba(0, 0, 0, 0.5); /* 阴影效果 */
        z-index: -1;
        cursor: pointer;
        &::before {
          content: '';
          position: absolute;
          top: 50%;
          left: 50%;
          transform: translate(-50%, -50%);
          width: 35px;
          height: 35px;
          border-radius: 50%;
          box-shadow: 0 0 8px 4px rgba(0, 240, 255, 0.5); /* 发光效果 */
        }
      }
      @mixin common-styles($color, $bg-color, $name-bg, $value-bg) {
        color: $color;
        $--value-bg: './assets/device/' + $value-bg + '.png';
        $--name-bg: './assets/device/' + $name-bg + '.png';
        .state {
          background-color: $bg-color;
        }
        .device-name {
          background: url($--name-bg) no-repeat center;
          background-size: 100% 100%;
        }
        .value-data {
          background: url($--value-bg) no-repeat center;
          background-size: 100% 100%;
        }
      }
      &.green {
        @include common-styles(#DFFFDE, #00FF23, 'name_bg_green', 'value_bg_green');
      }
      &.blue {
        @include common-styles(#D6FFFD, #00FFFC, 'name_bg_blue', 'value_bg_blue');
      }
      &.red {
        @include common-styles(#FFE7E7, #FF0000, 'name_bg_red', 'value_bg_red');
      }
    }
  }
  .jump-4times {
    position: absolute;
    left: 0;
    top: 0;
  }
  &.jump-4times {
    animation: bounce 2.5s ease-in-out 1 0.5s;
  }
}
@keyframes bounce {
  10%, 30%, 50%, 70%, 100% {
    transform: translateY(0); /* 落地 */
  }
  0% {
    transform: translateY(-100px); /* 起始最高点 */
  }
  20% {
    transform: translateY(-50px); /* 第一次反弹 */
  }
  40% {
    transform: translateY(-20px); /* 第二次反弹 */
  }
  60% {
    transform: translateY(-10px); /* 第三次反弹 */
  }
  85% {
    transform: translateY(-5px); /* 第四次反弹 */
  }
}